package vip.xiaonuo.supplier.modular.business.businessdetail.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import vip.xiaonuo.supplier.modular.business.businessMain.entity.SupplierBusinessMain;
import vip.xiaonuo.supplier.modular.business.businessdetail.entity.SupplierBusinessDetail;
import vip.xiaonuo.supplier.modular.business.businessdetail.param.SupplierBusinessDetailAddParam;
import vip.xiaonuo.supplier.modular.business.businessdetail.param.SupplierBusinessDetailEditParam;
import vip.xiaonuo.supplier.modular.business.businessdetail.param.SupplierBusinessDetailIdParam;
import vip.xiaonuo.supplier.modular.business.businessdetail.param.SupplierBusinessDetailPageParam;

import java.util.List;

/**
 * 业务明细表Service接口
 *
 * @author Mr.wu
 * @date  2025/03/26 11:23
 **/
public interface SupplierBusinessDetailService extends IService<SupplierBusinessDetail> {

    /**
     * 获取业务明细表分页
     *
     * @author Mr.wu
     * @date  2025/03/26 11:23
     */
    Page<SupplierBusinessDetail> page(SupplierBusinessDetailPageParam supplierBusinessDetailPageParam);

    /**
     * 添加业务明细表
     *
     * @author Mr.wu
     * @date  2025/03/26 11:23
     */
    void add(SupplierBusinessDetailAddParam supplierBusinessDetailAddParam);

    /**
     * 编辑业务明细表
     *
     * @author Mr.wu
     * @date  2025/03/26 11:23
     */
    void edit(SupplierBusinessDetailEditParam supplierBusinessDetailEditParam);

    /**
     * 删除业务明细表
     *
     * @author Mr.wu
     * @date  2025/03/26 11:23
     */
    void delete(List<SupplierBusinessDetailIdParam> supplierBusinessDetailIdParamList);

    /**
     * 获取业务明细表详情
     *
     * @author Mr.wu
     * @date  2025/03/26 11:23
     */
    SupplierBusinessDetail detail(SupplierBusinessDetailIdParam supplierBusinessDetailIdParam);

    /**
     * 获取业务明细表详情
     *
     * @author Mr.wu
     * @date  2025/03/26 11:23
     **/
    SupplierBusinessDetail queryEntity(String id);

    /**
     * 获取业务明细表分页
     *
     * @author Mr.wu
     * @date  2025/03/31 11:23
     */
    List<SupplierBusinessDetail> detailList(SupplierBusinessDetailPageParam supplierBusinessDetailPageParam);

    /**
     * 批量保存业务明细数据，并把多余的删除
     *
     * @author Mr.wu
     * @date  2025/03/31 11:23
     */
    void saveOrUpdateDetail(SupplierBusinessMain supplierBusinessMainOld,SupplierBusinessMain supplierBusinessMainNew, List<SupplierBusinessDetail> supplierBusinessDetailList);
}
